type Union = 'a' | 'b' | 'c';

type UppercaseA<Item extends string> = Item extends 'a' ? Uppercase<Item> : Item;

type Result61 = UppercaseA<Union>;

type Result62 = `${Union}~`;

type CamelCaseArray<Arr extends unknown[]> = Arr extends [infer Item, ...infer Rest]
  ? [CamelCase<Item & string>, ...CamelCaseArray<Rest>]
  : [];

type Result63 = CamelCaseArray<['limit_a', 'limit_b', 'limit_c']>;

type Result64 = CamelCase<'a_a' | 'b_b' | 'c_c'>;

type IsUnion<A, B = A> = A extends A ? ([B] extends [A] ? false : true) : never;

type Result65 = IsUnion<'a' | 'b'>;

type BEM<
  Block extends string,
  E extends string[],
  Modifiers extends string[],
> = `${Block}__${E[number]}--${Modifiers[number]}`;

type Result66 = BEM<'div', ['btn', 'span'], ['background-color', 'foreground-color']>;

type Combination<A extends string, B extends string> = A | B | `${A}${B}` | `${B}${A}`;

type AllCombinations<A extends string, B extends string = A> = A extends A
  ? Combination<A, AllCombinations<Exclude<B, A>>>
  : never;

type Result67 = AllCombinations<'A' | 'B'>;
// A AB AC ABC ACB BA B BC BAC BCA CA CB C CAB CBA
type Result68 = AllCombinations<'A' | 'B' | 'C'>;
